/*
 * @Author: your name
 * @Date: 2021-02-24 15:36:00
 * @LastEditTime: 2021-02-24 15:51:41
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \mongoShell\update1.js
 */
 var workmate1 = {
    name : 'JSpang',
    age : 33,
    sex : 1,
    job : '前端',
    skill:{
        skillOne : 'HTML+CSS',
        skillTwo : 'Javascript',
        skillThree : 'PHP'
    },
    regTime : new Date()
}

var workmate2 = {
    name : 'ShengLei',
    age : 30,
    sex : 1,
    job : 'JAVA后端',
    skill:{
        skillOne : 'HTML+CSS',
        skillTwo : 'J2EE',
        skillThree:'PPT'
    },
    regTime:new Date()
}

var workmate3 = {
    name : 'MinJie',
    age : 20,
    sex : 1,
    job : 'UI设计',
    skill:{
        skillOne : 'PhotoShop',
        skillTwo : 'UI',
        skillThree:'PPT+Excel+Word'
    },
    regTime:new Date()
}

//选择数据库.代表当前的数据库的名称是company
var db = connect('company');
var workmateArray = [workmate1,workmate2,workmate3];
//相当于给现在的company数据库中的workmate数据表中插入数据
db.workmate.insert(workmateArray);
print('[SUCCESS]: The Data was inserted')